package com.magupe.push.common.codec;

import com.magupe.push.common.protocol.Packet;
import com.magupe.push.common.protocol.PacketCodeC;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

public class PacketEncoder extends MessageToByteEncoder<Packet>{

	@Override
	protected void encode(ChannelHandlerContext ctx, Packet packet, ByteBuf out) throws Exception {
		PacketCodeC.INSTANCE.encode(out, packet);		
	}

}
